﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 球队用户基础输入参数
/// </summary>
public class AppUserTeamBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 用户
    /// </summary>
    [Required(ErrorMessage = "用户不能为空")]
    public virtual long? UserId { get; set; }
    
    /// <summary>
    /// 球队
    /// </summary>
    [Required(ErrorMessage = "球队不能为空")]
    public virtual long? TeamId { get; set; }
    
    /// <summary>
    /// 角色
    /// </summary>
    [Dict(nameof(TeamRoleEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "角色不能为空")]
    public virtual TeamRoleEnum? Role { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>
    [Dict(nameof(PlayerPositionEnum), AllowNullValue=true)]
    public virtual PlayerPositionEnum? Position { get; set; }
    
    /// <summary>
    /// 加入时间
    /// </summary>
    public virtual DateTime? JoinDate { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [Dict(nameof(StatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "状态不能为空")]
    public virtual StatusEnum? Status { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
}

/// <summary>
/// 球队用户分页查询输入参数
/// </summary>
public class PageAppUserTeamInput : BasePageInput
{
    /// <summary>
    /// 用户
    /// </summary>
    public long? UserId { get; set; }
    
    /// <summary>
    /// 球队
    /// </summary>
    public long? TeamId { get; set; }
    
    /// <summary>
    /// 角色
    /// </summary>
    [Dict(nameof(TeamRoleEnum), AllowNullValue=true)]
    public TeamRoleEnum? Role { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>
    [Dict(nameof(PlayerPositionEnum), AllowNullValue=true)]
    public PlayerPositionEnum? Position { get; set; }
    
    /// <summary>
    /// 加入时间范围
    /// </summary>
     public DateTime?[] JoinDateRange { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [Dict(nameof(StatusEnum), AllowNullValue=true)]
    public StatusEnum? Status { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 球队用户增加输入参数
/// </summary>
public class AddAppUserTeamInput
{
    /// <summary>
    /// 用户
    /// </summary>
    [Required(ErrorMessage = "用户不能为空")]
    public long? UserId { get; set; }
    
    /// <summary>
    /// 球队
    /// </summary>
    [Required(ErrorMessage = "球队不能为空")]
    public long? TeamId { get; set; }
    
    /// <summary>
    /// 角色
    /// </summary>
    [Dict(nameof(TeamRoleEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "角色不能为空")]
    public TeamRoleEnum? Role { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>
    [Dict(nameof(PlayerPositionEnum), AllowNullValue=true)]
    public PlayerPositionEnum? Position { get; set; }
    
    /// <summary>
    /// 加入时间
    /// </summary>
    public DateTime? JoinDate { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [Dict(nameof(StatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "状态不能为空")]
    public StatusEnum? Status { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(256, ErrorMessage = "备注字符长度不能超过256")]
    public string? Remark { get; set; }
    
}

/// <summary>
/// 球队用户删除输入参数
/// </summary>
public class DeleteAppUserTeamInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 球队用户更新输入参数
/// </summary>
public class UpdateAppUserTeamInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 用户
    /// </summary>    
    [Required(ErrorMessage = "用户不能为空")]
    public long? UserId { get; set; }
    
    /// <summary>
    /// 球队
    /// </summary>    
    [Required(ErrorMessage = "球队不能为空")]
    public long? TeamId { get; set; }
    
    /// <summary>
    /// 角色
    /// </summary>    
    [Dict(nameof(TeamRoleEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "角色不能为空")]
    public TeamRoleEnum? Role { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>    
    [Dict(nameof(PlayerPositionEnum), AllowNullValue=true)]
    public PlayerPositionEnum? Position { get; set; }
    
    /// <summary>
    /// 加入时间
    /// </summary>    
    public DateTime? JoinDate { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>    
    [Dict(nameof(StatusEnum), AllowNullValue=true)]
    [Required(ErrorMessage = "状态不能为空")]
    public StatusEnum? Status { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(256, ErrorMessage = "备注字符长度不能超过256")]
    public string? Remark { get; set; }
    
}

/// <summary>
/// 球队用户主键查询输入参数
/// </summary>
public class QueryByIdAppUserTeamInput : DeleteAppUserTeamInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataAppUserTeamInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 设置状态输入参数
/// </summary>
public class SetAppUserTeamStatusInput : BaseStatusInput
{
}
/// <summary>
/// 设置角色输入参数
/// </summary>
public class SetAppUserTeamRolesInput : BaseIdInput
{
    public long UserId { get; set; }

    public TeamRoleEnum Role { get; set; }
}

/// <summary>
/// 球队用户数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportAppUserTeamInput : BaseImportInput
{
    /// <summary>
    /// 用户 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? UserId { get; set; }
    
    /// <summary>
    /// 用户 文本
    /// </summary>
    [ImporterHeader(Name = "*用户")]
    [ExporterHeader("*用户", Format = "", Width = 25, IsBold = true)]
    public string UserFkDisplayName { get; set; }
    
    /// <summary>
    /// 球队 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? TeamId { get; set; }
    
    /// <summary>
    /// 球队 文本
    /// </summary>
    [ImporterHeader(Name = "*球队")]
    [ExporterHeader("*球队", Format = "", Width = 25, IsBold = true)]
    public string TeamFkDisplayName { get; set; }
    
    /// <summary>
    /// 角色
    /// </summary>
    [ImporterHeader(Name = "*角色")]
    [ExporterHeader("*角色", Format = "", Width = 25, IsBold = true)]
    public TeamRoleEnum? Role { get; set; }
    
    /// <summary>
    /// 位置
    /// </summary>
    [ImporterHeader(Name = "位置")]
    [ExporterHeader("位置", Format = "", Width = 25, IsBold = true)]
    public PlayerPositionEnum? Position { get; set; }
    
    /// <summary>
    /// 加入时间
    /// </summary>
    [ImporterHeader(Name = "加入时间")]
    [ExporterHeader("加入时间", Format = "", Width = 25, IsBold = true)]
    public DateTime? JoinDate { get; set; }
    
    /// <summary>
    /// 状态
    /// </summary>
    [ImporterHeader(Name = "*状态")]
    [ExporterHeader("*状态", Format = "", Width = 25, IsBold = true)]
    public StatusEnum? Status { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
}
